import Mock from 'mockjs'
import data from './icon'
import getAll from './getAll'


/* getIconList */
Mock.mock(
  '/api/getIconList',
  'get',
  () => {
    return {
      code: 200,
      msg: 'success',
      data: data
    }
  }
)

// Mock.mock(
//   'http://localhost:9002/Api/login',
//   'post',
//   () => {
//     return {"status":1,"data":{"token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIxIn0.qfd0G-elhE1aGr15LrnYlIZ_3UToaOM5HeMcXrmDGBM","menus":[{"name":"Index","meta":{"icon":"icon-home-fill","title":"首页"},"children":null},{"name":"sync","meta":{"icon":"icon-wallet1","title":"配置"},"children":[{"name":"sync","meta":{"icon":"icon-form-fill","title":"配置管理"},"children":null},{"name":"Icon","meta":{"icon":"icon-shuffling-banner-fill","title":"图标"},"children":null}]}],"userName":"测试用户"}}
//   }
// )


Mock.mock(
  'Api/getAll',
  'post',
  () => {
    return {
      code: 200,
      msg: 'success',
      data: getAll
    }
  }
)